package com.lzj.demo.design.visitor.user;

import com.lzj.demo.design.visitor.visitor.IVisitor;

public class Student extends IUser {

    public Student(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(IVisitor visitor) {
        visitor.visit(this);
    }

    /**
     * 排名
     * */
    public int ranking(){
        return (int) (Math.random()*100);
    }

    public int count(){
        return ranking();
    }
}
